<?php echo $this->fetch('inc/header.html'); ?> 
<?php
$this->_var['dpagecss'][] = $this->_var['TMPL_REAL']."/css/account.css";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/cart_pay.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/cart_pay.js";
?>
<link rel="stylesheet" type="text/css" href="<?php 
$k = array (
  'name' => 'parse_css',
  'v' => $this->_var['dpagecss'],
);
echo $k['name']($k['v']);
?>" />
<script type="text/javascript" src="<?php 
$k = array (
  'name' => 'parse_script',
  'v' => $this->_var['dpagejs'],
  'c' => $this->_var['dcpagejs'],
);
echo $k['name']($k['v'],$k['c']);
?>"></script>

<div class="blank"></div>

<div class="shadow_bg">
	<div class="wrap white_box"">
		<div class="page_title">
			<?php echo $this->_var['order_info']['deal_name']; ?>
		</div>
		<div class="switch_nav">
			<ul>
				<li class="current"><a href="<?php
echo parse_url_tag("u:account#index|"."".""); 
?>">支持的项目</a></li>
				<li><a href="<?php
echo parse_url_tag("u:account#project|"."".""); 
?>">我的项目</a></li>
				<li><a href="<?php
echo parse_url_tag("u:account#focus|"."".""); 
?>">关注的项目</a></li>
				<li><a href="<?php
echo parse_url_tag("u:account#credit|"."".""); 
?>">收支明细</a></li>
				
			</ul>
		</div>
		
		<div class="blank"></div>
		
		<?php echo $this->fetch('inc/money_box.html'); ?> 
		
		<div class="full">
			<table class="data-table order_table">

				<tr>
					<td class="deal_name" width=150>项目名称</td>
					<td>
						<?php if ($this->_var['deal_info']): ?>
						<a href="<?php
echo parse_url_tag("u:deal#show|"."id=".$this->_var['deal_info']['id']."".""); 
?>" target="_blank"><?php echo $this->_var['order_info']['deal_name']; ?></a>
						<?php else: ?>
						<?php echo $this->_var['order_info']['deal_name']; ?>
						<?php endif; ?>
					</td>
				</tr>
				<?php if ($this->_var['order_info']['consignee'] != ''): ?>
				<tr>
					<td class="deal_name">配送信息</td>
					<td>
						地址:<?php echo $this->_var['order_info']['province']; ?><?php echo $this->_var['order_info']['city']; ?><?php echo $this->_var['order_info']['address']; ?> 邮编:<?php echo $this->_var['order_info']['zip']; ?> 收件人:<?php echo $this->_var['order_info']['consignee']; ?> 电话:<?php echo $this->_var['order_info']['mobile']; ?>
					</td>
				</tr>
				<?php endif; ?>
				<?php if ($this->_var['order_info']['support_memo'] != ''): ?>
				<tr>
					<td class="deal_name">备注信息</td>
					<td>
						<?php echo $this->_var['order_info']['support_memo']; ?>
					</td>
				</tr>
				<?php endif; ?>
				<tr>
					<td class="deal_name">应付金额</td>
					<td>
						
						<?php if ($this->_var['order_info']['delivery_fee'] > 0): ?>
						项目金额:<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['order_info']['deal_price'],
);
echo $k['name']($k['v']);
?>
						运费:<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['order_info']['delivery_fee'],
);
echo $k['name']($k['v']);
?>
						总额：<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['order_info']['total_price'],
);
echo $k['name']($k['v']);
?>
						<?php else: ?>
						<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['order_info']['total_price'],
);
echo $k['name']($k['v']);
?>
						<?php endif; ?>
						
					</td>
				</tr>
				<tr>
					<td class="deal_name">收款情况</td>
					<td>
						<?php if ($this->_var['order_info']['order_status'] == 1): ?>
						因项目过期，资金已退到个人帐户
						<?php endif; ?>
						<?php if ($this->_var['order_info']['order_status'] == 2): ?>
						因项目限额已满，资金已退到个人帐户
						<?php endif; ?>	
						<?php if ($this->_var['order_info']['order_status'] == 3): ?>
						支付成功
						<?php endif; ?>	
						<?php if ($this->_var['order_info']['order_status'] == 0): ?>
						支付未完成
							<?php if ($this->_var['order_info']['credit_pay'] > 0): ?>
							已用余额支付<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['order_info']['credit_pay'],
);
echo $k['name']($k['v']);
?>
							<?php endif; ?>
						<?php endif; ?>	
					</td>
				</tr>
				<?php if ($this->_var['order_info']['order_status'] == 3): ?>
				<tr>
					<td class="deal_name">回报情况</td>
					<td>
						<?php if ($this->_var['order_info']['is_success'] == 0): ?>
							<?php if ($this->_var['order_info']['is_refund'] == 1): ?>
							项目失败，金额已退回会员帐户
							<?php else: ?>
							项目未成功
							<?php endif; ?>
						<?php else: ?>
							<?php if ($this->_var['order_info']['repay_time'] == 0): ?>
							项目成功，回报未发放
							<?php else: ?>
							<?php echo $this->_var['order_info']['repay_memo']; ?>
							<?php endif; ?>
						<?php endif; ?>
					</td>
				</tr>
				<?php endif; ?>
	
			</table>
			<?php if ($this->_var['order_info']['order_status'] == 0): ?>
			<div class="blank"></div>
			<form class="pay_form" action="<?php
echo parse_url_tag("u:account#go_order_pay|"."".""); 
?>" target="_blank">									
				
				<?php if ($this->_var['user_info']['money'] > 0): ?>
					<div class="form_row">
						<div class="blank15"></div>
						<label class="title">使用余额支付:</label>
						<input type="text" class="textbox" value="0" name="credit" style="width:100px;" />
						<label class="title" style="padding-left:10px;">可用余额：<?php 
$k = array (
  'name' => 'format_price',
  'v' => $this->_var['user_info']['money'],
);
echo $k['name']($k['v']);
?></label>
						<input type="hidden" name="max_credit" value="<?php echo $this->_var['user_info']['money']; ?>" />
						<input type="hidden" name="max_pay" value="<?php echo $this->_var['max_pay']; ?>" />
						<div class="blank15"></div>
					</div>
				<?php endif; ?>
						
				<?php echo $this->_var['payment_html']; ?>
				
				<div class="blank"></div>
				<div>
					<div class="ui-button green" rel="green">
						<div>
							<span>确定，去付款</span>
						</div>
					</div>				
					<input type="hidden" id="back_url" value="<?php
echo parse_url_tag("u:account#view_order|"."id=".$this->_var['order_info']['id']."".""); 
?>" />	
					<input type="hidden" value="<?php echo $this->_var['order_info']['id']; ?>" name="order_id" />	
					<input type="hidden" value="1" name="ajax" />					
					<div class="blank15"></div>
				</div>
				
			</form>
			<?php endif; ?>
		</div>

		
		<div class="blank"></div>
		
		
	</div>
</div>
<div class="blank"></div>
<?php echo $this->fetch('inc/footer.html'); ?> 